<html>
<head><meta charset="utf-8"><title>macOS following the cross-compile instructions · t-compiler/arm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/index.html">t-compiler/arm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html">macOS following the cross-compile instructions</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203656889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203656889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203656889">(Jul 12 2020 at 19:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> Hi, I'm trying the steps on a DTK soonish. A small note on the building instructions on the readme page: any reasons against <code>xcrun -show-sdk-path</code> for the sdk path? and on a simimlar note: is the 11.5 deployment target intentional? or was 10.15.5 the intended deployment target and this is just a typo?</p>



<a name="203657065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203657065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203657065">(Jul 12 2020 at 19:26)</a>:</h4>
<p>You mean using that tool like <code>ENV=$(xcrun...)</code>?</p>



<a name="203657095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203657095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203657095">(Jul 12 2020 at 19:27)</a>:</h4>
<p>And in my latest version, (<a href="https://github.com/shepmaster/rust/blob/silicon/silicon/README.md">https://github.com/shepmaster/rust/blob/silicon/silicon/README.md</a>) I switched to <code>11.0</code></p>



<a name="203657681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203657681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203657681">(Jul 12 2020 at 19:44)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116155">Jake Goulding</span> Yes, or with backticks. (forgot to double the backticks here to escape them)</p>



<a name="203657700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203657700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203657700">(Jul 12 2020 at 19:45)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> oh - should i go <code>silicon</code> and not <code>silicon-bootstrap</code>?</p>



<a name="203657776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203657776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203657776">(Jul 12 2020 at 19:47)</a>:</h4>
<p>I’ve stopped using backticks like that due to them not being nestable. But sure. </p>
<p>The reason is that I didn’t know about it. I’ll try that the next time I’m at a computer.</p>



<a name="203657856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203657856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203657856">(Jul 12 2020 at 19:49)</a>:</h4>
<p>Yeah, try the silicon branch. Slightly smaller steps.</p>



<a name="203657912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203657912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203657912">(Jul 12 2020 at 19:50)</a>:</h4>
<p>As time progresses, the instructions should shrink to zero, ideally.</p>



<a name="203657926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203657926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203657926">(Jul 12 2020 at 19:51)</a>:</h4>
<p>Ah, the forks of the other two projects aren't needed anymore? nice.</p>



<a name="203657941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203657941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203657941">(Jul 12 2020 at 19:51)</a>:</h4>
<p>Waiting for libc to release a new version, then will bump then in the compiler, then will add the target, then will get the target in the bootstrap compiler, then the entire first section can disappear.</p>



<a name="203659487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203659487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203659487">(Jul 12 2020 at 20:25)</a>:</h4>
<p>If you want to support cross compiling, leaving the DEPLOYMENT_TARGET at 10.15.5 is probably best. Especially because Apple currently still isn't fully canonically at 11.0 but still at 10.16 for the current Big Sur Intel Betas.</p>



<a name="203659640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203659640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203659640">(Jul 12 2020 at 20:29)</a>:</h4>
<p>(not at building the cross compiler yet, but I see you have some of your paths hardcoded into the config.toml) (cargo, rustc and rustfmt) - maybe <code>$ROOT</code> as base works in those paths too?</p>



<a name="203659781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203659781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203659781">(Jul 12 2020 at 20:33)</a>:</h4>
<blockquote>
<p>because Apple currently still isn't fully canonically at 11.0 but still at 10.16 for the current Big Sur Intel Betas.</p>
</blockquote>
<p>Can you explain more about this?</p>



<a name="203659790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203659790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203659790">(Jul 12 2020 at 20:33)</a>:</h4>
<blockquote>
<p>maybe <code>$ROOT</code> as base works in those paths too?</p>
</blockquote>
<p>Another thing I had no knowledge about!</p>



<a name="203659846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203659846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203659846">(Jul 12 2020 at 20:35)</a>:</h4>
<p>Although I only see </p>
<div class="codehilite"><pre><span></span><code>../src/bootstrap/bootstrap.py
926:    build.build_dir = os.path.abspath(build_dir.replace(&quot;$ROOT&quot;, build.rust_root))
</code></pre></div>



<a name="203659899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203659899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203659899">(Jul 12 2020 at 20:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116155">Jake Goulding</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/macOS.20following.20the.20cross-compile.20instructions/near/203659790">said</a>:</p>
<blockquote>
<blockquote>
<p>maybe <code>$ROOT</code> as base works in those paths too?</p>
</blockquote>
<p>Another thing I had no knowledge about!</p>
</blockquote>
<p>Just from looking in the <code>config.toml</code> i see in the build directory line that you can use <code>$ROOT</code> to specifiy the repo root. Don't know if that is supported on other vars as well. However, somehow injecting this without having to have an absolute path with your home would be nice.</p>



<a name="203659982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203659982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203659982">(Jul 12 2020 at 20:38)</a>:</h4>
<p>Sure, but it's also a tradeoff — this isn't usually a thing that people do / do while collaborating with others.</p>
<p>Another option would be to not check in the config.toml but instead pass arguments to <code>configure</code></p>



<a name="203659994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203659994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203659994">(Jul 12 2020 at 20:38)</a>:</h4>
<p>then could do more shell magic to be relative but become absolute</p>



<a name="203660100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660100">(Jul 12 2020 at 20:41)</a>:</h4>
<p>I mostly didn't do that because I was editing the configs more rapidly. Now though, it could probably be changed.</p>



<a name="203660252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660252">(Jul 12 2020 at 20:45)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116155">Jake Goulding</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/macOS.20following.20the.20cross-compile.20instructions/near/203659781">said</a>:</p>
<blockquote>
<blockquote>
<p>because Apple currently still isn't fully canonically at 11.0 but still at 10.16 for the current Big Sur Intel Betas.</p>
</blockquote>
<p>Can you explain more about this?</p>
</blockquote>
<p>Well, it is probably targetted that macOS Big Sur will report 11.0 on all platforms for the final release. However, in the current beta on intel there are API's and Tools that report 10.16 still.</p>



<a name="203660457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660457">(Jul 12 2020 at 20:51)</a>:</h4>
<p><a href="#narrow/stream/242906-t-compiler.2Farm/topic/macOS/near/203066123">That's deliberate</a>, but seems like a reason to correctly use 11.</p>



<a name="203660534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660534">(Jul 12 2020 at 20:53)</a>:</h4>
<p>okay - intel compile step 1 on macOS 10.15.5 finished <code>Build completed successfully in 1:03:33</code></p>



<a name="203660543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660543">(Jul 12 2020 at 20:54)</a>:</h4>
<p>following the instructions on the DTK seems to need me change the build and host triple manually first</p>



<a name="203660638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660638">(Jul 12 2020 at 20:55)</a>:</h4>
<p>You are performing the two initial cross-compiler steps on the DTK itself?</p>



<a name="203660684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660684">(Jul 12 2020 at 20:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116155">Jake Goulding</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/macOS.20following.20the.20cross-compile.20instructions/near/203660457">said</a>:</p>
<blockquote>
<p><a href="#narrow/stream/242906-t-compiler.2Farm/topic/macOS/near/203066123">That's deliberate</a>, but seems like a reason to correctly use 11.</p>
</blockquote>
<p>might be. haven't tried on intel macOS 11 beta 2 yet if that works. However, for my version of SubEthaEdit I still had to choose 10.6 in the availability macros to work on the beta 2.</p>



<a name="203660690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660690">(Jul 12 2020 at 20:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116155">Jake Goulding</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/macOS.20following.20the.20cross-compile.20instructions/near/203660638">said</a>:</p>
<blockquote>
<p>You are performing the two initial cross-compiler steps on the DTK itself?</p>
</blockquote>
<p>Trying to too, as you wrote this is untested. So might be helpful.</p>



<a name="203660711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660711">(Jul 12 2020 at 20:57)</a>:</h4>
<p>Looks like <code>xcrun -sdk macosx11.0 --show-sdk-path</code> is the right invocation.</p>



<a name="203660804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660804">(Jul 12 2020 at 20:59)</a>:</h4>
<blockquote>
<p>tried on intel macOS 11 beta 2</p>
</blockquote>
<p>FWIW, all my cross-compiling is done from x86_64 10.15.5 with the Xcode beta</p>



<a name="203660816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660816">(Jul 12 2020 at 20:59)</a>:</h4>
<p>okay, my cross compiling is done from 10.15.5 with the beta 2 of the universal xcode</p>



<a name="203660879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660879">(Jul 12 2020 at 21:00)</a>:</h4>
<p>and i started cross-compiling from the <code>silicon-bootstrap</code> branch so i continue that. The DTK compile tries the <code>silicon</code> branch.</p>



<a name="203660938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660938">(Jul 12 2020 at 21:02)</a>:</h4>
<p>which seems to produce some <code>&lt;jemalloc&gt;: Unsupported system page size</code> errors, and might be doomed because of rosetta not supporting the native page size?</p>



<a name="203660967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203660967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203660967">(Jul 12 2020 at 21:03)</a>:</h4>
<p>Should ultimately be fine; it's just that jemalloc uses a pagesize they haven't enabled yet. I don't know why it works, honestly, but you will probably be fine.</p>



<a name="203661097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203661097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203661097">(Jul 12 2020 at 21:06)</a>:</h4>
<p>ah, missing cmake? - <code>brew install cmake</code> coming</p>



<a name="203661192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203661192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203661192">(Jul 12 2020 at 21:09)</a>:</h4>
<p>I think <span class="user-mention" data-user-id="317220">@André Arko</span> mentioned there was some trickery with cmake...</p>



<a name="203661194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203661194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203661194">(Jul 12 2020 at 21:09)</a>:</h4>
<p>but I don't see why the x86_64 version wouldn't work.</p>



<a name="203661314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203661314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203661314">(Jul 12 2020 at 21:12)</a>:</h4>
<p>hmmm - cross compile also failing at cmake </p>
<div class="codehilite"><pre><span></span><code>make: *** <span class="o">[</span>all<span class="o">]</span> Error <span class="m">2</span>
thread <span class="s1">&#39;main&#39;</span> panicked at <span class="s1">&#39;</span>
<span class="s1">command did not execute successfully, got: exit code: 2</span>

<span class="s1">build script failed, must exit now&#39;</span>, /Users/dom/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.42/src/lib.rs:861:5
note: run with <span class="sb">`</span><span class="nv">RUST_BACKTRACE</span><span class="o">=</span><span class="m">1</span><span class="sb">`</span> environment variable to display a backtrace
    finished in <span class="m">50</span>.826
failed to run: /Users/dom/Data/github/rust-silicon/silicon/cross/build/bootstrap/debug/bootstrap install -i --stage <span class="m">1</span> --host aarch64-apple-darwin --target aarch64-apple-darwin,x86_64-apple-darwin --warnings warn src/librustc src/libstd cargo
Build completed unsuccessfully in <span class="m">0</span>:20:18
</code></pre></div>



<a name="203661337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203661337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203661337">(Jul 12 2020 at 21:13)</a>:</h4>
<p><code>brew install cmake</code> seems to have done the trick on the DTK for the bootstrapping compiler though.</p>



<a name="203661583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203661583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203661583">(Jul 12 2020 at 21:18)</a>:</h4>
<p>here's the backtrace if that is any help (intel, building the cross compiler step)</p>
<div class="codehilite"><pre><span></span><code>make: *** [all] Error 2
thread &#39;main&#39; panicked at &#39;
command did not execute successfully, got: exit code: 2

build script failed, must exit now&#39;, /Users/dom/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.42/src/lib.rs:861:5
stack backtrace:
   0: &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::sys_common::backtrace::print
   4: std::panicking::default_hook::{{closure}}
   5: std::panicking::default_hook
   6: std::panicking::rust_panic_with_hook
   7: rust_begin_unwind
   8: std::panicking::begin_panic_fmt
   9: cmake::fail
             at /Users/dom/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.42/src/lib.rs:861
  10: cmake::run
             at /Users/dom/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.42/src/lib.rs:839
  11: cmake::Config::build
             at /Users/dom/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.42/src/lib.rs:745
  12: &lt;bootstrap::native::Llvm as bootstrap::builder::Step&gt;::run
             at src/bootstrap/native.rs:308
  13: bootstrap::builder::Builder::ensure
             at src/bootstrap/builder.rs:1362
  14: bootstrap::compile::rustc_cargo_env
             at src/bootstrap/compile.rs:582
  15: bootstrap::compile::rustc_cargo
             at src/bootstrap/compile.rs:534
  16: &lt;bootstrap::compile::Rustc as bootstrap::builder::Step&gt;::run
             at src/bootstrap/compile.rs:505
  17: bootstrap::builder::Builder::ensure
             at src/bootstrap/builder.rs:1362
  18: &lt;bootstrap::compile::Assemble as bootstrap::builder::Step&gt;::run
             at src/bootstrap/compile.rs:790
  19: bootstrap::builder::Builder::ensure
             at src/bootstrap/builder.rs:1362
  20: bootstrap::builder::Builder::compiler
             at src/bootstrap/builder.rs:578
  21: &lt;bootstrap::install::Rustc as bootstrap::builder::Step&gt;::run
             at src/bootstrap/install.rs:262
  22: bootstrap::builder::Builder::ensure
             at src/bootstrap/builder.rs:1362
  23: &lt;bootstrap::install::Rustc as bootstrap::builder::Step&gt;::make_run
             at src/bootstrap/install.rs:177
  24: bootstrap::builder::StepDescription::maybe_run
             at src/bootstrap/builder.rs:189
  25: bootstrap::builder::StepDescription::run
             at src/bootstrap/builder.rs:230
  26: bootstrap::builder::Builder::run_step_descriptions
             at src/bootstrap/builder.rs:570
  27: bootstrap::builder::Builder::execute_cli
             at src/bootstrap/builder.rs:561
  28: bootstrap::Build::build
             at src/bootstrap/lib.rs:489
  29: bootstrap::main
             at src/bootstrap/bin/main.rs:15
  30: std::rt::lang_start::{{closure}}
             at /Users/dom/Data/github/rust-silicon/src/libstd/rt.rs:67
  31: std::panicking::try
  32: std::rt::lang_start_internal
  33: std::rt::lang_start
             at /Users/dom/Data/github/rust-silicon/src/libstd/rt.rs:67
  34: main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    finished in 11.094
Traceback (most recent call last):
  File &quot;../../x.py&quot;, line 11, in &lt;module&gt;
    bootstrap.main()
  File &quot;/Users/dom/Data/github/rust-silicon/src/bootstrap/bootstrap.py&quot;, line 981, in main
    bootstrap(help_triggered)
  File &quot;/Users/dom/Data/github/rust-silicon/src/bootstrap/bootstrap.py&quot;, line 967, in bootstrap
    run(args, env=env, verbose=build.verbose)
  File &quot;/Users/dom/Data/github/rust-silicon/src/bootstrap/bootstrap.py&quot;, line 143, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /Users/dom/Data/github/rust-silicon/silicon/cross/build/bootstrap/debug/bootstrap -vvvvv install -i --stage 1 --host aarch64-apple-darwin --target aarch64-apple-darwin,x86_64-apple-darwin --warnings warn src/librustc src/libstd cargo
</code></pre></div>



<a name="203661601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203661601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203661601">(Jul 12 2020 at 21:19)</a>:</h4>
<p>Thats surprisingly unhelpful</p>



<a name="203661845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203661845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203661845">(Jul 12 2020 at 21:25)</a>:</h4>
<p>anything you can recommend? I do have a working regular rustup installation on that machine as well, don't know if anything intereferes with antyhgin here</p>



<a name="203661951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203661951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203661951">(Jul 12 2020 at 21:28)</a>:</h4>
<p>is cmake installed and in PATH?</p>



<a name="203661991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203661991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203661991">(Jul 12 2020 at 21:28)</a>:</h4>
<p>exit code 2 seems to be file not found perhaps (though not sure)</p>



<a name="203662015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> André Arko <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662015">(Jul 12 2020 at 21:29)</a>:</h4>
<p>cmake on the DTK requires --HEAD, iirc</p>



<a name="203662021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> André Arko <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662021">(Jul 12 2020 at 21:29)</a>:</h4>
<p>(as in, <code>brew install cmake --HEAD</code>)</p>



<a name="203662094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662094">(Jul 12 2020 at 21:30)</a>:</h4>
<p><span class="user-mention" data-user-id="317220">@André Arko</span> cmake built fine on the DTK without --HEAD and seems to work. will reinstall with <code>--HEAD</code> if it fails</p>



<a name="203662120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> André Arko <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662120">(Jul 12 2020 at 21:31)</a>:</h4>
<p>the SDK version bifurcation appears to be 100% based on which Xcode you are using: reportedly Xcode 11 says it is 10.16, while Xcode 12 says it is 11.0: <a href="https://eclecticlight.co/2020/07/06/why-big-sur-wont-stumble-over-version-numbers/">https://eclecticlight.co/2020/07/06/why-big-sur-wont-stumble-over-version-numbers/</a></p>



<a name="203662171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> André Arko <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662171">(Jul 12 2020 at 21:32)</a>:</h4>
<p>(I assume this is so that anything built in the past against Xcode &lt;=11 will still have working version checks)</p>



<a name="203662183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662183">(Jul 12 2020 at 21:32)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> cmake is fine and in path on the intel machine doing the cross compile. Last successful reports before the make error </p>
<div class="codehilite"><pre><span></span><code>[  1%] Built target LLVMDemangle
[  3%] Built target obj.llvm-tblgen
make: *** [all] Error 2
</code></pre></div>



<a name="203662187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662187">(Jul 12 2020 at 21:33)</a>:</h4>
<p>weird</p>



<a name="203662191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662191">(Jul 12 2020 at 21:33)</a>:</h4>
<p>and DESTDIR is not set by chance?</p>



<a name="203662264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662264">(Jul 12 2020 at 21:34)</a>:</h4>
<p>it is set and replicates the whole repo path under /tmp/crossed</p>



<a name="203662278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662278">(Jul 12 2020 at 21:35)</a>:</h4>
<p>aha</p>



<a name="203662282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662282">(Jul 12 2020 at 21:35)</a>:</h4>
<p>Oh yeah,</p>



<a name="203662290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662290">(Jul 12 2020 at 21:35)</a>:</h4>
<p>That was fixed in the other branch</p>



<a name="203662333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662333">(Jul 12 2020 at 21:36)</a>:</h4>
<p>ah RUST_DESTDIR? not DESTDIR?</p>



<a name="203662347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662347">(Jul 12 2020 at 21:36)</a>:</h4>
<p>you probably want the latest patch</p>



<a name="203662351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662351">(Jul 12 2020 at 21:37)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/74252/files">https://github.com/rust-lang/rust/pull/74252/files</a></p>



<a name="203662358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662358">(Jul 12 2020 at 21:37)</a>:</h4>
<p>Rust_destdir only exists in the other branch</p>



<a name="203662364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662364">(Jul 12 2020 at 21:37)</a>:</h4>
<p>And will disappear when I rebase on the pr linked.</p>



<a name="203662440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662440">(Jul 12 2020 at 21:39)</a>:</h4>
<p>ah - okay - so xcompile try on intel stop here or restart with the silicon branch?</p>



<a name="203662489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662489">(Jul 12 2020 at 21:40)</a>:</h4>
<p>Easier fix is to replace install with build and remove destdir.</p>



<a name="203662493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662493">(Jul 12 2020 at 21:40)</a>:</h4>
<p>Then, run the install command with destdir when you are done.</p>



<a name="203662501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203662501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203662501">(Jul 12 2020 at 21:41)</a>:</h4>
<p>Turns out I’m the first to use destdir &amp; install but not build first.</p>



<a name="203663063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203663063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203663063">(Jul 12 2020 at 21:57)</a>:</h4>
<p>oh sweet. the DTK completed the first build in 0:44 - faster than my iMac Pro ^^</p>



<a name="203663123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203663123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203663123">(Jul 12 2020 at 21:58)</a>:</h4>
<p>I actually noticed similar, and my 6core i9 MacBook Pro isn’t a slouch</p>



<a name="203663131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203663131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203663131">(Jul 12 2020 at 21:59)</a>:</h4>
<p>so do i need to also set some triples for the cross compiler build?</p>



<a name="203663189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203663189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203663189">(Jul 12 2020 at 22:00)</a>:</h4>
<p>build needs to be set to intel again, while the others are set with command line arguments - ic</p>



<a name="203663393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203663393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203663393">(Jul 12 2020 at 22:06)</a>:</h4>
<p>So far building on the DTK seems to be a smooth ride. Didn't have cmake (which should probably just be put in the setup section), otherwise only setting the build triplet to intel was needed.</p>



<a name="203663400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203663400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203663400">(Jul 12 2020 at 22:06)</a>:</h4>
<p>Probably need to turn in now - thanks for all your help!</p>



<a name="203663973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203663973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203663973">(Jul 12 2020 at 22:22)</a>:</h4>
<blockquote>
<p>Didn't have cmake (which should probably just be put in the setup section)</p>
</blockquote>
<p><a href="https://rustc-dev-guide.rust-lang.org/getting-started.html">https://rustc-dev-guide.rust-lang.org/getting-started.html</a>. My readme wasn’t intended as a how to develop rustc, just the bare basics for cross compiling the initial versions.</p>



<a name="203676177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203676177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203676177">(Jul 13 2020 at 04:08)</a>:</h4>
<p>okay, next error step at the DTK is </p>
<div class="codehilite"><pre><span></span><code>error: failed to run custom build <span class="nb">command</span> <span class="k">for</span> <span class="sb">`</span>openssl-sys v0.9.54<span class="sb">`</span>

Caused by:
  process didn<span class="s1">&#39;t exit successfully: `/Users/dom/rust-silicon/silicon/cross/build/x86_64-apple-darwin/stage1-tools/release/build/openssl-sys-3252b3ef97fc03e4/build-script-main` (exit code: 101)</span>
<span class="s1">--- stdout</span>
<span class="s1">cargo:rustc-cfg=const_fn</span>

<span class="s1">--- stderr</span>
<span class="s1">thread &#39;</span>main<span class="s1">&#39; panicked at &#39;</span>don<span class="s1">&#39;t know how to configure OpenSSL for aarch64-apple-darwin&#39;</span>, /Users/dom/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.9.0+1.1.1g/src/lib.rs:194:18
note: run with <span class="sb">`</span><span class="nv">RUST_BACKTRACE</span><span class="o">=</span><span class="m">1</span><span class="sb">`</span> environment variable to display a backtrace

warning: build failed, waiting <span class="k">for</span> other <span class="nb">jobs</span> to finish...
The following warnings were emitted during compilation:

warning: src/zlib/gzlib.c:214:15: error: implicitly declaring library <span class="k">function</span> <span class="s1">&#39;snprintf&#39;</span> with <span class="nb">type</span> <span class="s1">&#39;int (char *, unsigned long, const char *, ...)&#39;</span> <span class="o">[</span>-Werror,-Wimplicit-function-declaration<span class="o">]</span>
warning:         <span class="o">(</span>void<span class="o">)</span>snprintf<span class="o">(</span>state-&gt;path, len + <span class="m">1</span>, <span class="s2">&quot;%s&quot;</span>, <span class="o">(</span>const char *<span class="o">)</span>path<span class="o">)</span><span class="p">;</span>
warning:               ^
warning: src/zlib/gzlib.c:214:15: note: include the header &lt;stdio.h&gt; or explicitly provide a declaration <span class="k">for</span> <span class="s1">&#39;snprintf&#39;</span>
warning: <span class="m">1</span> error generated.

error: build failed
<span class="nb">command</span> did not execute successfully: <span class="s2">&quot;/Users/dom/rust-silicon/silicon/bootstrap/build/x86_64-apple-darwin/stage0/bin/cargo&quot;</span> <span class="s2">&quot;build&quot;</span> <span class="s2">&quot;--target&quot;</span> <span class="s2">&quot;aarch64-apple-darwin&quot;</span> <span class="s2">&quot;-Zdual-proc-macros&quot;</span> <span class="s2">&quot;-Zbinary-dep-depinfo&quot;</span> <span class="s2">&quot;-j&quot;</span> <span class="s2">&quot;4&quot;</span> <span class="s2">&quot;--release&quot;</span> <span class="s2">&quot;--manifest-path&quot;</span> <span class="s2">&quot;/Users/dom/rust-silicon/src/tools/cargo/Cargo.toml&quot;</span> <span class="s2">&quot;--features&quot;</span> <span class="s2">&quot;rustc-workspace-hack/all-static&quot;</span> <span class="s2">&quot;--message-format&quot;</span> <span class="s2">&quot;json-render-diagnostics&quot;</span>
expected success, got: <span class="nb">exit</span> code: <span class="m">101</span>
failed to run: /Users/dom/rust-silicon/silicon/cross/build/bootstrap/debug/bootstrap install -i --stage <span class="m">1</span> --host aarch64-apple-darwin --target aarch64-apple-darwin,x86_64-apple-darwin src/librustc src/libstd cargo
</code></pre></div>


<p>openssl is installed with brew, any special configuration sauce I can do?</p>



<a name="203680048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203680048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203680048">(Jul 13 2020 at 05:45)</a>:</h4>
<p>Okay, after setting the OPENSSL_DIR to the one shown by brew info, zlib seems to fail:</p>
<div class="codehilite"><pre><span></span><code>The following warnings were emitted during compilation:

warning: src/zlib/gzlib.c:214:15: error: implicitly declaring library function &#39;snprintf&#39; with type &#39;int (char *, unsigned long, const char *, ...)&#39; [-Werror,-Wimplicit-function-declaration]
warning:         (void)snprintf(state-&gt;path, len + 1, &quot;%s&quot;, (const char *)path);
warning:               ^
warning: src/zlib/gzlib.c:214:15: note: include the header &lt;stdio.h&gt; or explicitly provide a declaration for &#39;snprintf&#39;
warning: 1 error generated.

error: failed to run custom build command for `libz-sys v1.0.25`
</code></pre></div>



<a name="203703405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203703405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203703405">(Jul 13 2020 at 11:27)</a>:</h4>
<p>Is the “static” whatever setting enabled in the config toml?</p>



<a name="203703438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203703438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203703438">(Jul 13 2020 at 11:27)</a>:</h4>
<p>Basically we don’t want that yet because we can’t build OpenSSL ourselves yet.</p>



<a name="203739201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203739201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203739201">(Jul 13 2020 at 16:49)</a>:</h4>
<p>Ah okay. I misread the comment earlier. Disabling cargo-native-static again and rerunning.</p>



<a name="203740432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203740432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203740432">(Jul 13 2020 at 16:59)</a>:</h4>
<p>Yeah, I shouldn't have committed that. That's part of my <em>next step</em>, to be able to start out with a crossed cargo.</p>



<a name="203742161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203742161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203742161">(Jul 13 2020 at 17:13)</a>:</h4>
<p>You might also want to drop <code>cargo</code> off of the build line (since the non-static cargo won't work anyway)</p>



<a name="203756128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203756128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dominik Wagner <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203756128">(Jul 13 2020 at 19:00)</a>:</h4>
<p>okay - I'll probably monitor the situation then and try again once your next step is up. ^^</p>



<a name="203761512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/203761512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#203761512">(Jul 13 2020 at 19:44)</a>:</h4>
<p>if your goal is to have a compiler and not to build the compiler, I can also link you a zipfile of a previous native complier.</p>



<a name="204807705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204807705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204807705">(Jul 23 2020 at 14:52)</a>:</h4>
<p><span class="user-mention" data-user-id="324511">@Rudy Richter</span></p>



<a name="204812855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204812855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rudy Richter <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204812855">(Jul 23 2020 at 15:29)</a>:</h4>
<p>scrolling back through the discussion I'm not sure I see the particular failure I'm seeing, looks like 404 trying to update submodules? ah, nope, failure downloading the rust-std-beta-aarch64-apple-darwin.tar.gz.sha256 file</p>



<a name="204817398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204817398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204817398">(Jul 23 2020 at 16:06)</a>:</h4>
<p>You are trying to do it on the DTK?</p>



<a name="204817412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204817412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204817412">(Jul 23 2020 at 16:06)</a>:</h4>
<p>The first step, that is?</p>



<a name="204818104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204818104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204818104">(Jul 23 2020 at 16:10)</a>:</h4>
<p>You might need to download the x86 rustc and cargo by hand and then configure them. See the second stage of the readme for the configuration options.</p>



<a name="204833380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204833380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rudy Richter <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204833380">(Jul 23 2020 at 18:15)</a>:</h4>
<p>yeah, I was, I realized where I had gone wrong. then got pulled into other discussions.</p>



<a name="204842920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204842920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204842920">(Jul 23 2020 at 19:25)</a>:</h4>
<p>I haven't actually done the very first step on the DTK — I didn't have access to one when I started, and haven't attempted to since.</p>



<a name="204853655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204853655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204853655">(Jul 23 2020 at 21:06)</a>:</h4>
<p><span class="user-mention" data-user-id="324588">@Misty De Méo</span></p>



<a name="204853676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204853676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204853676">(Jul 23 2020 at 21:06)</a>:</h4>
<p><a href="https://github.com/shepmaster/rust/blob/silicon/silicon/README.md">https://github.com/shepmaster/rust/blob/silicon/silicon/README.md</a></p>



<a name="204854030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204854030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204854030">(Jul 23 2020 at 21:11)</a>:</h4>
<p>Thank you, I'll give this a try!</p>



<a name="204854854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204854854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204854854">(Jul 23 2020 at 21:20)</a>:</h4>
<p>I will say that I know it doesn’t work to do the initial cross compile on the DTK yet. Haven’t figured that out.</p>



<a name="204854912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204854912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204854912">(Jul 23 2020 at 21:21)</a>:</h4>
<p>And the readme doesn’t yet describe how to get cmake on the DTK; but you might know a tool to help install things on macOS 😁</p>



<a name="204854919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204854919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204854919">(Jul 23 2020 at 21:21)</a>:</h4>
<p>Can confirm, I'm not seeing the first step working on a DTK - just because it's trying to fetch a prebuilt Rust for the current host. Pretty sure I can fix that by updating <code>config.toml</code>, going to try that first before I start building on an Intel Mac.</p>



<a name="204855013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204855013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204855013">(Jul 23 2020 at 21:22)</a>:</h4>
<p><span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span> Yeah, now that CMake 3.18.0 is out and in package managers, getting a working cmake is a lot easier</p>



<a name="204855043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204855043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204855043">(Jul 23 2020 at 21:23)</a>:</h4>
<p>You can theoretically follow the steps in the next section to specify an x86 rustc and friends.</p>



<a name="204855191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204855191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204855191">(Jul 23 2020 at 21:24)</a>:</h4>
<p>But see the “cross compiling on the DTK” thread (that I can’t figure out how to link on mobile)</p>



<a name="204855275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204855275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204855275">(Jul 23 2020 at 21:25)</a>:</h4>
<p>As even if you do it right, there’s still an error.</p>



<a name="204855429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204855429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204855429">(Jul 23 2020 at 21:27)</a>:</h4>
<p>So if you are interested in fixing/figuring that out, keep on that path. If you just want it to work, you’ll want to start on x86</p>



<a name="204855478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204855478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204855478">(Jul 23 2020 at 21:27)</a>:</h4>
<p>I'm interested in fixing if I can, I'll see anyway. Otherwise, I'll move over to x86</p>



<a name="204855833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204855833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204855833">(Jul 23 2020 at 21:31)</a>:</h4>
<p>Sure am building LLVM a lot these days <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="204855913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204855913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204855913">(Jul 23 2020 at 21:32)</a>:</h4>
<p>This builds it 4 times at least.</p>



<a name="204862775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204862775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204862775">(Jul 23 2020 at 22:57)</a>:</h4>
<p>OK, confirmed you can build it locally without cross-compiling. I can submit a PR to update/simplify the docs?</p>



<a name="204863162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204863162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204863162">(Jul 23 2020 at 23:01)</a>:</h4>
<p>Sure!</p>
<p>To double check, you built a version of <code>rustc</code> that is <code>Mach-O 64-bit executable arm64</code> and that can produce executables of the same?</p>



<a name="204863230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204863230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204863230">(Jul 23 2020 at 23:02)</a>:</h4>
<p>Yup, correct.</p>
<div class="codehilite"><pre><span></span><code>$ lipo -info ~/native-build/usr/local/bin/rustc
Non-fat file: /Users/mistydemeo/native-build/usr/local/bin/rustc is architecture: arm64

$ rustc test.rs
$ lipo -info test
Non-fat file: test is architecture: arm64
</code></pre></div>



<a name="204863261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204863261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204863261">(Jul 23 2020 at 23:02)</a>:</h4>
<p>Cool!</p>



<a name="204863301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204863301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204863301">(Jul 23 2020 at 23:03)</a>:</h4>
<p>I think <em>technically</em> it's still cross-compiling as the architecture changes, but at least we don't need two machines.</p>



<a name="204863329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204863329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204863329">(Jul 23 2020 at 23:03)</a>:</h4>
<p>Yeah, and it's down to two LLVM builds instead of four, which counts as a win for sure</p>



<a name="204863589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204863589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204863589">(Jul 23 2020 at 23:06)</a>:</h4>
<p>Oh, so just skipping the second step. Yeah, that was never <strong>needed</strong>. Mostly it was a test to thoroughly exercise the code generated from the first step.</p>



<a name="204863603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204863603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204863603">(Jul 23 2020 at 23:07)</a>:</h4>
<p>Right, yeah. That makes sense.</p>



<a name="204863637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204863637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204863637">(Jul 23 2020 at 23:07)</a>:</h4>
<p>It's "easy" to make something that says it's <code>arm64</code>, less easy for it to actually work in practice <span aria-label="wink" class="emoji emoji-1f609" role="img" title="wink">:wink:</span></p>



<a name="204863647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204863647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204863647">(Jul 23 2020 at 23:07)</a>:</h4>
<p>Very true!</p>



<a name="204863798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204863798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204863798">(Jul 23 2020 at 23:09)</a>:</h4>
<p>I'll leave the second part in the instructions but change the docs to skip using a separate machine for building the first part.</p>



<a name="204864227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204864227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204864227">(Jul 23 2020 at 23:16)</a>:</h4>
<p><a href="https://github.com/shepmaster/rust/pull/1">https://github.com/shepmaster/rust/pull/1</a></p>



<a name="204865525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204865525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204865525">(Jul 23 2020 at 23:38)</a>:</h4>
<p>thanks! I tweaked it a bit to automate the build setting — <a href="https://github.com/shepmaster/rust/blob/silicon/silicon/README.md#compiling-on-aarch64-apple-darwin-aka-the-dtk">https://github.com/shepmaster/rust/blob/silicon/silicon/README.md#compiling-on-aarch64-apple-darwin-aka-the-dtk</a></p>



<a name="204865559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/macOS%20following%20the%20cross-compile%20instructions/near/204865559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Misty De Méo <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/macOS.20following.20the.20cross-compile.20instructions.html#204865559">(Jul 23 2020 at 23:39)</a>:</h4>
<p>Oh, nice - even better</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>